<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">
<head>

<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
	<link href="static/css/index.css" rel="stylesheet" type="text/css" /> 

</head>

<body>
	<div class="container">
		<div id="login" class="wrap login-wrap">
			<form action="LoginServlet" method="POST">
				<span class="title">用户登录</span>
				<div class="item">
					<input placeholder="用户名" name="userName">
				</div>
				<div class="item">
					<input placeholder="用户密码" name="userPass" type="password">
				</div>
				<div class="item">
					<input placeholder="验证验" name="vCode" type="password"> <img
						src="VCServlet">
				</div>
				<span> 
				<%
			 	String msg = (String) request.getAttribute("error");
			 msg = msg == null ? "" : msg;
			 %> <%=msg%>
				</span>
				<div class="opt">
					<button type="submit">登录</button>
					<a href="register.jsp" type="button">注册</a>
				</div>
			</form>
		</div>
		
	</div>
	<script>
		function onRegisterClick(type) {
			var loginDv = document.getElementsByClassName("login-wrap")[0];
			var registerDv = document.getElementsByClassName("register-wrap")[0];

			if (1 == type) {
				loginDv.style.transform = "rotateY(180deg)";
				registerDv.style.transform = "rotateY(0deg)";
				return;
			}
			loginDv.style.transform = "rotateY(0deg)";
			registerDv.style.transform = "rotateY(-180deg)";
		}
	</script>
</body>

</html>